home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
019
/
ratio16a.arc
/
ADDRATIO.DOC
next >
Wrap
Text File
|
1988-04-12
|
10KB
|
247 lines
D O C U M E N T A T I O N F O R R A T I O M O D
Release 16.1A - April 14, 1988
Kevin Lutz, Sysop
Northern Illinois RBBS
(312) 526-3349 (300/1200/2400)
692 Walnut Road
Wauconda, IL 60084-1145
WHAT THE RATIO MOD DOES
-----------------------
RATIO mod adds the necessary source code changes to the w/ 3/31/88 fixes
RBBS-PC 16-1A source files so that RBBS-PC can keep track of the number of
bytes a users has uploaded and downloaded, and to keep track of the number
of bytes and files downloaded for the day. It will also allow RBBS-PC to
require a user to maintain a minimum upload to download ratio.
You can select a ratio for each security level, or require no ratio at all.
You can also base the ratio on the number of files uploaded/downloaded,
the number of bytes uploaded/downloaded, the number of files downloaded
per day or the number of bytes per day. The RATIO mod gives you full
flexibility to use a different ratio method or no method for each security
level you have.
WHY THIS MOD IS NEEDED
----------------------
As I began to analyze what my users were doing, I realized that the main
use of my BBS was for downloading. But I also realized, few people were
uploading. I did my best to encourage my users to upload, but nothing
seemed to work, until now.
This program will cure the problem of downloaditus! For example, on my
BBS, I require all new users to upload at least one file before they are
allowed to download. Once they upload a file, they are allowed to down-
load 15 files before they have to upload again. Paid subscribers are
exempt from the ratio requirements and can download to their hearts content.
Since I implemented this mod on my BBS in January of 1988 up through March
of 1988 I was forced to upgrade my 40 meg drive to an 80 meg drive just to
keep up with the uploads. Since I added the extra 40 meg about 30 days ago
I am already down to less than 12 meg left. And with so many new files,
very few users have complained!
HOW TO ADD THE MOD TO YOUR SOURCE CODE
--------------------------------------
To add the mod to your files you will need the W/FIXES thru 3/31 RBBS-PC
16.1A source code, the BLED.EXE file - preferably version 1.61, the merge
files and the files that came with this patch.
In all you'll need:
RBBS-PC.BAS (Ver 16.1A)
RBBSSUB1.BAS "
RBBSSUB2.BAS "
RBBSSUB3.BAS "
RBBS-VAR.BAS "
BLED.EXE (Ver 1.61)
RBBS-PC.MRG (Release 16.1A)
RBBSSUB1.MRG "
RBBSSUB2.MRG "
ADDRATIO.BAT "
And, of course, you will need all of the files and programs needed to
recompile and link the modified source files.
To add the mods, just bled them into your source code and compile the
new code as it states in the RBBS manual, but.......
BEFORE YOU COMPILE
------------------
Before you compile the modified source code, you must add a few variables
to the RBBS-VAR.BAS file. Many mods include a new RBBS-VAR.BAS with the
necessary changes already in it, but I have found over time that when you
apply many patches and each one comes with its own RBBS-VAR.BAS it is
nothing but a big headache.
Use your favorite text editor such as Wordstar in the Non-Document Mode
and add the following two variables:
DLBYTES!, _ 'RATIO
DL.BYTES$, _ 'RATIO
NUM.DNLD.BYTS!, _ 'RATIO
ULBYTES!, _ 'RATIO
UL.BYTES$, _ 'RATIO
BYTE.METHOD, _ 'RATIO
RATIO.RESTRICTION, _ 'RATIO
TODAY.DL$, _ 'RATIO
DL.TODAY!, _ 'RATIO
TODAY.BYTES$, _ 'RATIO
BYTES.TODAY! 'RATIO
Once the code has been patched, you must recompile the modified BAS
files and then link them together. The information needed to do this
can be found in the RBBS-PC documentation.
WHAT'S NEXT?
------------
Now that you applied the patch, you must set-up the ratio requirements
you plan to use for each security level. Even if you don't plan to
require users to maintain a certain ratio, you must make the following
changes to the passwords file:
The new format for the Passwords file is as follows:
<parms as stated in the RBBS 16-1A doc plus>,<ratio method>,<ratio>
All fields are the same as the original RBBS Doc, except that you MUST add
two new fields at the end of each line.
The Ratio Method field should be either a '0' or a '1'.
'0' - meaning use the files uploaded to files downloaded ratio
'1' - meaning use the bytes uploaded to bytes downloaded ratio
'2' - meaning use the files per day restriction
'3' - meaning use the bytes per day restriction
The Ratio field should be any number over zero.
'0' - meaning this security level is exempt from a ratio requirement
??? - meaning the caller must maintain a ratio of at least 1 file
(byte) uploaded to every ??? files (bytes) downloaded, or
they can only download ??? files (bytes) per day.
For example, this is what my PASSWRDS file looks like:
SKIPRATIO,170,120,200,90,0600,1200,0,0
,140,60,60,365,0001,2400,1,10
,150,70,,90,,,0,15
,165,90,,120,,,0,30
,170,120,,365,,,2,10
,200,360,,730,,,3,250000
For the people who know the temporary password 'SKIPRATIO' they can
skip the ratio requirement.
For security level 140, non-subscribers on my board, they must maintain
a ratio of 1 byte uploaded for every 10 bytes downloaded.
For security level 150, trial period non-subscribers, they must maintain
a ratio of 1 file uploaded for every 15 downloaded.
For security level 165, visiting sysops, they must maintain a ratio
of 1 file uploaded for every 30 downloaded.
For secutiry level 170, they can only download 10 files per day.
For security level 200, they can only download 250000 bytes per day.
NOTE: FIRST TIME CALLERS MUST UPLOAD AT LEAST ONE FILE (BYTE) BEFORE
DOWNLOADING UNLESS THEY ARE EXEMPT FROM THE RATIO REQUIREMENT,
OR THEY ARE USING THE DAILY RATIO METHOD.
CHANGES TO THE USERS FILE
-------------------------
A program called RATIO.EXE is included that must be used to initialize
the USERS file so it will be able to keep track of the bytes uploaded and
downloaded. This MUST be run even if your not using the byte method.
This program will read and initialize positions 98-105 in the USERS so
that RBBS-PC can store the number of bytes uploaded and downloaded.
Positions 98-105 in the USERS file are currently unused by RBBS.
The program will initialize all empty records to zero and all users filled
records to a multiple of there current uploads and downloads.
For example, if you uploaded 2 files and downloaded 5 files, and you used
a multiple of 20000 for files uploaded and 50000 for files downloaded, the
record would be initialized as follows.
Bytes uploaded = 40000 ( 2 files uploaded * 20000 each )
Bytes downloaded = 250000 ( 5 files downloaded * 50000 each )
As a starting point for your files, I recommend you set both at 25000.
To run this program, just make a back-up of your USERS file, type RATIO.EXE.
The program will ask you for the name of your USERS file, I suggest you use
your back-up. It will then ask for the multiple to be used to multiply times
the users current upload and download ratio. Just enter any number from
0 to 100000. The program will then modify the users file.
When the program has finished, just replace your users file with the new
users file and away you go. Even if you decide not to use the Ratio mod,
you can still use the modified users file with the unmodified RBBS-PC.EXE
since RBBS doesn't use that area for the USERS file anyways.
TESTING THE PATCH
-----------------
This patch was written and tested using Microsoft Quick BASIC 3.0 and 4.0
and was tested with an IBM 8513 VGA Analog Monitor on an Epson Equity III+
computer.
There is a large section of the code that uses the Block IF-THEN-ELSE
structure instead of the standard single command IF-THEN-ELSE used in most
places in RBBS. This may cause the code not to compile on older versions of
Quick BASIC.
I tested this patch with RBBS 151C, and 151C with fixes through 12/13/87
and also with the DSZ, COLOR, SPACE, LASTWRD, MS/SOTR, and DVSLICE merges
and it works just fine. If there are problems with new releases of RBBS,
just call my BBS for the latest update.
THAT'S ALL FOLKS
----------------
If you find this patch to be useful and you believe it adds a lot to your
BBS, please consider a donation of $10 to:
Kevin Lutz, Sysop
Northern Illinois RBBS
692 Walnut Road
Wauconda, IL 60084-1145
Voice: (312) 526-3133
Data: (312) 526-3349 (300/1200/2400)
(312) 526-3725 (300/1200/2400 MNP)
If you have an Idea for a mod, call my BBS and leave me a comment.
THANKS !!!
----------
I would like to thank Ed Copley of the Toolbox, who's original mod for
RBBS 14-1D inspired and aided me with this mod. Thanks Ed.